package com.dc.servlet;


import com.sun.deploy.net.HttpResponse;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class helloServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException{
        request.setCharacterEncoding("utf-8");
        response.setContentType("text/html;Charset=utf-8");
        response.setCharacterEncoding("utf-8");
        response.getWriter().println("终于见到servlet Hello word");
    }
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws  IOException{
        doPost(request,response);
    }
}
